// pages/hotel/hotel.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabList: ["城市酒店", "机场酒店", "度假村"],
    currentTab: 0 ,// 当前选中标签索引，默认选第一个
    cityhotel: [
        {
            "id": 1,
            "name": "宁波东港喜来登酒店",
            "price": "499",
            "imageUrl": "https://ts3.tc.mm.bing.net/th/id/OIP-C._D2MlrNI6FgJ7qwMKSc6VQAAAA?rs=1&pid=ImgDetMain&o=7&rm=3"
          },
          {
            "id": 2,
            "name": "杭州西湖国宾馆",
            "price": "788",
            "imageUrl": "https://ts2.tc.mm.bing.net/th/id/OIP-C.hn8hnqIJt7m-Y_AqaH4MMQHaFq?rs=1&pid=ImgDetMain&o=7&rm=3"
          },
          {
            "id": 3,
            "name": "上海外滩茂悦大酒店",
            "price": "620",
            "imageUrl": "https://staticfile.badazhou.com/20200710/ca9a24f607f9aafa1bbff95bbf02f022.jpg"
          },
          {
            "id": 4,
            "name": "厦门海景洲际酒店",
            "price": "850",
            "imageUrl": "https://ts4.tc.mm.bing.net/th/id/OIP-C.4gadfO1aS8chyDhDjmILqwHaEK?rs=1&pid=ImgDetMain&o=7&rm=3"
          },
          {
            "id": 5,
            "name": "成都世纪城天堂洲际大饭店",
            "price": "680",
            "imageUrl": "https://sales.mafengwo.net/mfs/s17/M00/8E/69/CoUBXl9cc3GAMK8mAAFr-69EhzA18.jpeg?imageMogr2%2Fthumbnail%2F!440x260r%2Fgravity%2FCenter%2Fcrop%2F!440x260%2Fquality%2F100"
          },
          {
            "id": 6,
            "name": "三亚·亚特兰蒂斯酒店",
            "price": "1299",
            "imageUrl": "https://ts3.tc.mm.bing.net/th/id/OIP-C.arc7g_xhraN73gr2E8QGAQHaE8?rs=1&pid=ImgDetMain&o=7&rm=3"
          }
      ],



  },
  // 切换标签事件处理
  handleTabChange(e) {
    const index = e.currentTarget.dataset.index;
    this.setData({
      currentTab: index
    });
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})